package com.dwy2002.pojo.po.refund;

import com.dwy2002.pojo.po.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * @author 杜伟毅
 * @version 1.0
 * @since 2025/03/06
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class RefundLogs extends BaseEntity {
    /**
     * 关联退款记录ID
     */
    private String refundId;
    /**
     * 原状态
     */
    private Integer oldStatus;
    /**
     * 新状态
     */
    private Integer newStatus;
    /**
     * 操作备注
     */
    private String remark;
    /**
     * 操作人ID
     */
    private String operatorId;
    /**
     * 创建时间
     * <p>
     * 数据库默认值：创建的当前时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8", shape = JsonFormat.Shape.STRING)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)        // 反序列化
    @JsonSerialize(using = LocalDateTimeSerializer.class)        // 序列化
    private LocalDateTime createdAt;
    /**
     * 逻辑删除
     */
    private Integer deleted;
}
